package com.woniu.car.feignclient;

import com.woniu.car.common.ResponseEntity;
import com.woniu.car.exception.StatisticsException;
import com.woniu.car.parameter.ElasticServerUpdateParameter;
import com.woniu.car.parameter.ElasticShopAddParameter;
import com.woniu.car.parameter.ElasticShopUpdateParameter;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName ElasticClient
 * @Description
 * @Author 王维鑫
 * @Version
 **/
@FeignClient(name = "elastic-service")
public interface ElasticClient {
    @DeleteMapping("/elastic/ElasticServerDelete")
    //@ApiOperation("根据传入的数据店铺id删除索引库信息")
    public ResponseEntity ElasticServerDelete(@PathVariable("receiverId") Integer receiverId) throws StatisticsException;

    @PostMapping("/elastic/ElasticShopAdd")
    //@ApiOperation("新增商铺信息")
    public ResponseEntity ElasticShopAdd(@RequestBody ElasticShopAddParameter parameter) throws StatisticsException;

    @GetMapping("/elastic/ElasticShopSearch")
    //@ApiOperation("通过copyTo共同字段查询商铺信息")
    public ResponseEntity ElasticShopSearch(@PathVariable("search") String search) throws StatisticsException;

    @PutMapping("/elastic/ElasticShopUpdate")
   // @ApiOperation("根据传入商铺Id更新商铺信息")
    public ResponseEntity ElasticShopUpdate(@RequestBody ElasticShopUpdateParameter parameter) throws StatisticsException;

    @DeleteMapping("/elastic/ElasticShopDelete")
    //@ApiOperation("根据传入商铺Id删除商铺信息")
    public ResponseEntity ElasticSearchShopDelete(@PathVariable("shopId") Integer shopId) throws StatisticsException;

    @PutMapping("/elastic/ElasticServerUpdate")
    //s@ApiOperation("根据传入的商铺Id查询提供的服务以及描述")
    public ResponseEntity ElasticServerUpdate(@RequestBody ElasticServerUpdateParameter parameter) throws StatisticsException;
}
